﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HRM.Common
{
    public class wcf_rest_sqlcommand // simple class for stored proc or cmd info passed from client
    {
        public string command { get; set; }     // for stored proc, name of stored proc, for command text of command
        public string commandtype { get; set; } // either "text" or "storedprocedure" blank defaults to storedprocedure
        public string connect { get; set; }     // connect string name for matching service connectionstring
        public string paramnames { get; set; }  // paramater names delimited list for sp only, not text command
        public string paramvalues { get; set; } // parameter values delimited list for sp only, not text command
        public object[] paramlist { get; set; } //mảng các biến params, nếu insert nhiều row =>
        //public object[][] paramlist dùng để 
        public string executetype { get; set; } // can be "scaler" or "nonquery" or blank for default (execute reader)
        public int numberbatch { get; set; }
        public bool jsonformat { get; set; }

        public wcf_rest_sqlcommand() // public constructor
        {
            command = "";
            commandtype = "";
            paramvalues = "";
            paramnames = "";
            paramlist = null;
            connect = "";
            executetype = "";
            numberbatch = 1;
            jsonformat = true;
        }
    }
}
